/**
 * 
 */
package com.netty.server.console;

import io.netty.channel.Channel;
import io.netty.channel.group.DefaultChannelGroup;

/**
 * @author Lee
 * 
 */
public class NettyChannels {
	private static DefaultChannelGroup channels=new DefaultChannelGroup();
	
	public static DefaultChannelGroup getChannels()
	{
		return channels;
	}
	
	public static void add(Channel channel)
	{
		channels.add(channel);
	}
	
	public static void remove(Channel channel)
	{
		channels.remove(channel);
	}
	
	public static Integer getCount()
	{
		return channels.size();
	}
	
	public static Channel getChannel(Integer id)
	{		 
		return channels.find(id);
	}
}
